import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import local_remove from '@dfeidao/atom-web/local/remove';
import local_set from '@dfeidao/atom-web/local/set';
import a003 from './a003';
// 搜索查询
export default async function a004(fd: IFeidaoAiBrowserComponent) {
	// 获取查询框关键字并存储
	const name_key = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="name_key"]').value.trim();
	if (name_key) {
		local_set(fd, 'name_key', name_key);
	} else {
		local_remove(fd, 'name_key');
	}
	// 点击查询移除当前选中的数据
	local_remove(fd, "pub_package");
	local_remove(fd, "page_no");
	// 调用查询事件
	a003(fd);
}
